<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Untitled Page</title>
    <meta charset="UTF-8">
    <script src="../static/js/jquery.js"></script>
</head>
<body>
    <div id="patient_img" >
    </div>
    <script src="{{ url_for('static', filename='js/function_all.js') }}"></script>
    <script src="{{ url_for('static', filename='js/jquery-3.3.1.js') }}"></script>

    <script type="text/javascript">
        //获取当前窗口的url--得到图片的index
        var test = window.location.href;
        var temp = test.split('=')[1];
        var k = temp.slice(4);
        var image_index = Number(k);
        //动态生成图片--相似用户的
        // var text_usr_dict = jsjx();
        var tongue_url_temp = text_usr_dict[image_index]['tongue_url'];
        var regex = /'.*?'/g;//正则表达式匹配url
        var tongue_url_temp_02 = tongue_url_temp.match(regex);
        var tongue_url_list = [];
        var html_img = "";
        for(var i=0;i<tongue_url_temp_02.length;i++){
            var item = tongue_url_temp_02[i].slice(1,-1);
            tongue_url_list.push(item)
        }
        for(var j=0;j<tongue_url_list.length;j++){
            var tongue_url ="/home/ubuntu/data/dieseas_test/0/" ;
            tongue_url += tongue_url_list[j];
            html_img += "<img src="+tongue_url+" width='500' />";
        }
        $('#patient_img').html(html_img);
    </script>
</body>
</html>

